{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "b2d14edb",
   "metadata": {},
   "outputs": [],
   "source": [
    "import k3d"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "c4359de5",
   "metadata": {},
   "outputs": [],
   "source": [
    "k3d.switch_to_text_protocol()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "1197bd62",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'text'"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "k3d._protocol.get_protocol()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "7c464a5a",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "c9b7fdf9d1cc4321bd008e7cfb7cab92",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Output()"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "\n",
    "points_number = 500\n",
    "positions = 50 * np.random.random_sample((points_number,3)) - 25\n",
    "colors = np.random.randint(0, 0xFFFFFF, points_number)\n",
    "\n",
    "plot = k3d.plot()\n",
    "points = k3d.points(positions.astype(np.float32), colors.astype(np.uint32), point_size=3.0, shader='flat')\n",
    "plot += points\n",
    "plot.display()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a79645ee",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
